package com.zengdada.report.service;

import net.sf.jasperreports.engine.JRAbstractExporter;
import net.sf.jasperreports.engine.export.JRGraphics2DExporter;
import net.sf.jasperreports.engine.export.JRPdfExporter;
import net.sf.jasperreports.engine.export.JRRtfExporter;
import net.sf.jasperreports.engine.export.ooxml.JRDocxExporter;
import net.sf.jasperreports.engine.export.ooxml.JRXlsxExporter;
import net.sf.jasperreports.export.*;

/**
 * @Auther: 12614
 * @Contact: 1261438511@qq.com
 * @Date: 2019/3/12 17:38
 * @Description:
 */
public enum JasperReportType {
    RTF(JRRtfExporter.class, SimpleRtfReportConfiguration.class),
    DOCX(JRDocxExporter.class, SimpleDocxReportConfiguration.class),
    XLSX(JRXlsxExporter.class, SimpleXlsxReportConfiguration.class),
    PDF(JRPdfExporter.class, SimplePdfReportConfiguration.class),
    GRAPHICS2D(JRGraphics2DExporter.class, SimpleGraphics2DReportConfiguration.class);
// RTF(JRRtfExporter.class, SimpleRtfExporterConfiguration.class),
//    DOCX(JRDocxExporter.class, SimpleDocxReportConfiguration.class),
//    XLSX(JRXlsxExporter.class, SimpleXlsxReportConfiguration.class),
//    PDF(JRPdfExporter.class, SimplePdfReportConfiguration.class),
//    GRAPHICS2D(JRGraphics2DExporter.class, SimpleGraphics2DReportConfiguration.class);


    private Class<? extends JRAbstractExporter> jrExporterClass;
    private Class<? extends SimpleReportExportConfiguration> configurationClass;

    JasperReportType(Class<? extends JRAbstractExporter> jrExporterClass, Class<? extends SimpleReportExportConfiguration> configurationClass) {
        this.jrExporterClass = jrExporterClass;
        this.configurationClass = configurationClass;
    }

    public Class<? extends JRAbstractExporter> getJrExporterClass() {
        return jrExporterClass;
    }

    public Class<? extends SimpleReportExportConfiguration> getConfigurationClass() {
        return configurationClass;
    }
}